package com.dingdang.feign.callback;

import com.dingdang.data.Result;
import com.dingdang.feign.OrderFeign;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component
public class OrderFeignCallBack implements OrderFeign {

    private Logger logger = LoggerFactory.getLogger(ReserveFeignCallBack.class);

    @Override
    public Result selectInfo(HttpServletRequest request) {
        logger.error("调用服务熔断了");
        return Result.FALLEOVER();
    }

    @Override
    public String refund(String orderId, String tradeNo, String price, String cause) {
        logger.error("调用服务熔断了");
        return "GG";
    }
}
